windopw.onload = function(){
    var endTime = new Date("2018-11-23 21:10:10");
    function seckill(){
    var nowTime = new Date();
    var interval = endTime.getTime()- nowTime.getTime();
    if(interval <= 999){
        clearInterval(timer);
    }

    var day = Number.parseInt( interval / (24*60*60*1000));
    var hour = Number.parseInt (( interval- day*(24*60*60*1000))/ (60*1000))
    var minute = ((interval % (60*60*1000)) / (60*1000));
    daydiv = document.getElementsByClassName('day')[0];
    daydiv.innerHTML=day+"天";

    hourdiv = document.getElementsByClassName('hour')[0];
    hourdiv.innerHTML= hour+"时";

    minutediv = document.getElementsByClassName('minute')[0];
    minutediv.innerHTML=minute+"分";

    seconddiv = document.getElementsByClassName('second')[0];
    swconddiv.innerHTML = second+"秒";


    }
var timer = setInterval(seckill,1000);
}